package com.lanyou.esb.redis.proxy.impl;

import org.springframework.stereotype.Service;

import com.lanyou.esb.common.Constants4Redis;
import com.lanyou.esb.redis.proxy.base.BaseStrJedisProxy;
import com.lanyou.esb.redis.vo.IfAlarmWorkOrderVo;

/**
 * 接口告警工单Redis操作代理
 * 
 * @author Davey.wu
 */
@Service
public class IfAlarmWorkOrderJedisProxy extends
		BaseStrJedisProxy<IfAlarmWorkOrderVo> {

	private static final String SUFFIX = Constants4Redis.PREFIX_WORKORDER;

	public IfAlarmWorkOrderJedisProxy() {
		this.setTimeOut(Constants4Redis.REDIS_TIMEOUT_IF_ALARM);
	}

	@Override
	public String generateKeyFromObject(IfAlarmWorkOrderVo target) {
		return SUFFIX + KEY_SEPARATOR + target.getCode();
	}

	@Override
	public String generateKey(String field) {
		return SUFFIX + KEY_SEPARATOR + field;
	}
}
